<include file="Public:header" />
<script>
$(document).ready(function(e) {
    $('.showcurimg').each(function(index, element) {
        $(this).click(function(e) {
            $(this).find('img.img').show();
        });
		$(this).mouseleave(function(e) {
            $(this).find('img.img').hide();
        });
    });
});
</script>	
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h"><a href="{:U('add')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>新增商品</a>
    
    
    
    
    
    
     <a data-toggle="modal" data-target="#myModal" href="javascript:void(0);" class="btn btn-info"><i class="glyphicon glyphicon-search"></i>搜索</a>
    
    
    
    
    
     
    
    
      </div>
    
    
    
    
    
    
    <volist name="list" id="vo">
    
    <div class="media NewsListMobile">
  <div class="media-left media-middle">
    <a href="{:U('Home/'.$vo['cate_name'].'/'.$vo['id'], array(), true, false, true, __SITEID__)}" target="_blank">
      <img class="media-object" src="<notempty name="vo['img_url']">{:getThumbPath($vo['img_url'])}<else/>__PUBLIC__/logo.gif</notempty>" alt="...">
    </a>
  </div>
  <div class="media-body">
    <h4 class="media-heading">{$vo.title}</h4>
    <p><span style="color:#f00; font-weight:bold;">¥{$vo.price}</span>&nbsp;&nbsp;<span>库存：{$vo.stocks}</span></p>
    
    <p>商品分类：{$vo.category_name}</p>
    
    
    <p class="optionList"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span>
                <else/>
                <span class="status0 status_btn" field="status,{$vo.id}"></span></eq>  <a target="_blank" onClick="art.dialog.open('{:U('Home/'.$vo['cate_name'].'/'.$vo['id'], array(), true, false, true, __SITEID__)}', {width: 800, height: 500,lock:true,title:'商品预览'});"><i class="glyphicon glyphicon-eye-open"></i></a>  <a href="{:U('edit',array('id'=>$vo['id']))}"><i class="glyphicon glyphicon-edit"></i></a>  <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');"><i class="glyphicon glyphicon-trash"></i></a></p>
                
  </div>
</div>
    
    
    
    </volist>
    <div class="pages">{$pages}</div>
  </div>
  <div class="clear"></div>
</div>



    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">搜索</h4>
          </div>
          <div class="modal-body">
             <form action="" method="get" class="form-inline"><select name="supplier_id" class="form-control">
          <option value="0">请选择供货商</option>
          <volist name="suppier" id="vo"> <option 
            <eq name="supplier_id" value="$vo['id']">selected="selected"</eq>
             value="{$vo.id}">{$vo.susername}
            </option>
          </volist>
        </select><br>

        <select name="category_id" class="form-control">
          <option value="0">请选择分类</option>
          <volist name="categoryList" id="vo"> <option 
            <eq name="category_id" value="$vo['id']">selected="selected"</eq>
             value="{$vo.id}">{$vo.title}
            </option>
          </volist>
        </select><br>

        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" value="{$keywords}" class="form-control" /><br>

        <button type="submit" class="btn btn-default">搜索</button>
      </form>
          </div>
          
        </div> 
      </div>
    </div>


<include file="Public:footer" />